/*
 * Copyright (c)  2020,  DataPipeline
 * All rights reserved.
 *
 * Id:BigDecimalTypeHandler.java   2020-07-18 21:19 wanglijun
 */
package cn.datacare.orm.mapping.type.handler;

import cn.datacare.orm.mapping.type.JavaSqlTypeHandler;
import cn.datacare.orm.mapping.type.TypeParameter;

import java.sql.SQLException;

/**
 * <p>
 * Title: BigDecimalTypeHandler
 * </p>
 * <p>
 * Description: BigDecimal 转换类型
 * </p>
 * <p>
 * Copyright: Copyright (c) 2020
 * </p>
 * <p>
 * Company/Department: DataPipeline
 * </p>
 *
 * @author wanglijun
 * @version 1.0
 * @since 2020-07-18 21:19
 */
public class BigDecimalTypeHandler implements JavaSqlTypeHandler {
    /***
     *   基础类，用来sql到java，java到sql的映射
     * @param typeParameter
     * @return Object 返回对象
     * @throws SQLException
     */
    @Override
    public Object getValue(TypeParameter typeParameter) throws SQLException {
        return typeParameter.getResultSet().getBigDecimal(typeParameter.getIndex());
    }

    /**
     * <p>
     * Title:
     * </p>
     * <p>
     * Description:
     * </p>
     * <p>
     * Copyright: Copyright (c) 2020
     * </p>
     * <p>
     * Company/Department: DataPipeline
     * </p>
     *
     * @author wanglijun
     * @version 1.0
     * @since 2020-07-18 21:42
     */
    public static class ByteTypeHandler {
    }
}
